home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7960 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  989 b 

  1. Path: gail.ripco.com!mambuhl
  2. From: mambuhl@ripco.com (Martin Ambuhl)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: #include --> Question
  5. Date: 29 Feb 1996 21:44:11 GMT
  6. Organization: Ripco Communications, Inc.
  7. Message-ID: <4h56nb$7e2@gail.ripco.com>
  8. NNTP-Posting-Host: foley.ripco.com
  9.  
  10. <Matt> mmartone@mysite.com <76002.702@CompuServe.COM> in
  11. <4gvp2c$sdr$1@mhafc.production.compuserve.com> asks:
  12.  
  13. >        How do i include a file with the #include statement?  the
  14. >file is "c:\snappy\1.gif".
  15.  
  16. The answer to your question is easy:
  17.  
  18.     #include "c:/snappy/1.gif"
  19.  
  20. But, it is likely that this is _not_ what you want to do.
  21. The effect of `#include "file"' is the same as pasting `file' into your
  22. code at that point.  Since this file is likely a binary image (although
  23. you could append a `.gif' to the name of anything), I would guess that
  24. you actually want to read it into a buffer.
  25.  
  26.                                              
  27. --
  28. * Martin Ambuhl       net: mambuhl@ripco.com
  29. * Chicago, IL (USA)    
  30.